﻿using DataAccess;
using DevExpress.XtraEditors;
using System;

namespace QuanLyKhachSan
{
    public partial class FormXemThongTin : XtraForm
    {
        public FormXemThongTin()
        {
            InitializeComponent();
        }

        public FormXemThongTin(TaiKhoan tk)
        {
            InitializeComponent();
            InitTaiKhoan(tk);
        }

        private void InitTaiKhoan(TaiKhoan tk)
        {
            lblHoTen.Text = tk.NhanVien.TenNhanVien;
            lblDiaChi.Text = tk.NhanVien.DiaChi;
            lblGioiTinh.Text = tk.NhanVien.GioiTinh == true ? "Nam" : "Nữ";
            lblSoCMND.Text = tk.NhanVien.SCMND;
            lblTenChucVu.Text = tk.NhanVien.Chucvu.TenCV;
            lblUsername.Text = tk.Username;
            lblEmailDangKy.Text = tk.EmailDangKy;
            lblTenNhomTaiKhoan.Text = tk.NhomTaiKhoan.TenNhom;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    }
}
